function getstyle(obj, attr) {
	var value;
	if (obj.currentStyle) {
		value = obj.currentStyle[attr];
	} else {
		value = window.getComputedStyle(obj, null)[attr];

	}

if (attr == "opacity") {
	return Math.round(parseFloat(value)*100)

} else {
	return parseInt(value);
}
}
function move(obj, json,fn,number) {
	if(obj.timer){
	clearInterval(obj.timer);
	}
	obj.timer = setInterval(function() {
		var bstop=true;//同步属性是否到达目标值
	for(var attr in json){
		var target=json[attr];
	var num = (getstyle(obj, attr));
	if(!number){
		number=30;
	}
	var speed=(target-num)/number;
	speed>0?speed=Math.ceil(speed):speed=Math.floor(speed)
	
		
		if (num !=target) {
			bstop=false;
			if (attr == "opacity") {
				obj.style[attr] = (num + speed) / 100;
			} else {
				obj.style[attr] = num + speed + "px";
			}

		}
		//console.log("----")
		
		}
	if(bstop){
	clearInterval(obj.timer);
			if(fn){
				fn();
			}
		}
	}, 30)
}